<div class="layui-card">
    <div class="layui-card-header">
        <h2>发送语音消息</h2>
    </div>
    <div class="layui-card-body">
        <form class="layui-form" action="<?php echo \yii\helpers\Url::to(['create'])?>" method="post">
            <div class="layui-form-item">
                <label for="" class="layui-form-label">接收号码</label>
                <div class="layui-input-inline" style="width: 600px">
                    <input type="text" name="phone" value="<?php echo $model->phone; ?>" placeholder="请输入接收号码，多个使用英文,隔开"  class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux"><?php echo $model->getFirstError('phone')?></div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">发送内容</label>
                <div class="layui-input-block">
                    <textarea name="content" class="layui-textarea" placeholder="请输入发送内容"><?php echo $model->content; ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">中继线路</label>
                <div class="layui-input-inline">
                    <select name="trunk_name" lay-verify="required" >
                        <option value=""></option>
                        <?php foreach ($trunks as $trunk){ ?>
                            <option value="<?php echo $trunk['channelid']; ?>" <?php if ($model->trunk_name==$trunk['channelid']){echo 'selected';} ?> ><?php echo $trunk['name']; ?></option>
                        <?php } ?>
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux"><?php echo $model->getFirstError('trunk_name')?></div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">语速</label>
                <div class="layui-input-inline">
                    <select name="spd" lay-verify="required" >
                        <?php foreach (range(1,15) as $v){ ?>
                            <option value="<?php echo $v; ?>" <?php echo $v==5?'selected':''; ?> ><?php echo $v; ?></option>
                        <?php } ?>
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux">默认为5中语速</div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">音调</label>
                <div class="layui-input-inline">
                    <select name="pit" lay-verify="required" >
                        <?php foreach (range(1,15) as $v){ ?>
                            <option value="<?php echo $v; ?>" <?php echo $v==5?'selected':''; ?> ><?php echo $v; ?></option>
                        <?php } ?>
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux">默认为5中音调</div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">音量</label>
                <div class="layui-input-inline">
                    <select name="vol" lay-verify="required" >
                        <?php foreach (range(1,15) as $v){ ?>
                            <option value="<?php echo $v; ?>" <?php echo $v==5?'selected':''; ?> ><?php echo $v; ?></option>
                        <?php } ?>
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux">默认为5中音量</div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">发音人</label>
                <div class="layui-input-block">
                    <?php foreach ($model->per_arr as $k=>$v){ ?>
                        <input type="radio" name="per" value="<?php echo $k; ?>" title="<?php echo $v; ?>" <?php echo $k==0?'checked':''; ?> >
                    <?php } ?>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" lay-submit class="layui-btn">确认</button>
                    <a href="<?php echo \yii\helpers\Url::to(['index']); ?>" class="layui-btn layui-btn-primary">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>


<?php
$js = <<<JS
    layui.use(['form','element','table', 'layer'],function() {
        var form = layui.form;  
        var element = layui.element;  
        var table = layui.table;  
        var layer = layui.layer;  
        
    });
JS;
$this->registerJs($js);
